﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BidPreparation.model
{
    // 全局类
    public sealed class UserInfo
    {
        private string userNo;
        private string userName;
        private string userType;

        private static UserInfo instance = null;
        private static readonly object padlock = new object();

        private UserInfo() { }  

        public static UserInfo Instance
        {
            get {
                lock (padlock)
                {
                    if (instance == null)
                    {
                        instance = new UserInfo();
                    }

                    return instance;
                }
            }
        }

        public string UserNo
        {
            get { return userNo; }
            set { userNo = value; }
        }

        public string UserType
        {
            get { return userType; }
            set { userType = value; }
        }

        public string UserName
        {
            get { return userName; }
            set
            {
                userName = value;
            }
        }
    }
}
